package com.example.homework8.sqliteroom;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface UserDao {
    @Insert
    void insert(User user);

    @Query("SELECT * FROM users")
    List<User> getALL();

    @Query("SELECT * FROM users WHERE age<:age")
    List<User> searchUserByAge(int age);
}